// 地址页面
import request from '../utils/request'
export function getAdress() {
  return request({
    url: '/adress',
    method: 'get'
  })
}

export function addAdress(data) {
  return request({
    url: '/adress',
    data,
    method: 'post'
  })
}

export function getidaddress(id) {
  return request({
    method: 'get',
    url: '/adress/' + id
  })
}

export function updateAdress(id, data) {
  return request({
    url: '/adress/' + id,
    data,
    method: 'patch'
  })
}

export function deleteAdress(id) {
  return request({
    url: '/adress/' + id,
    method: 'delete'
  })
}

export function getAdressById(userid) {
  return request({
    url: '/adress?userid=' + userid,
    method: 'get'
  })
}
